import {create} from './component';

let demoComponent=create();
document.body.appendChild(demoComponent);

//HMR 接口
/*if(module.hot){
    module.hot.accept('./component',()=>{

    	console.log("hot");
        const nextComponent=component();
        document.body.replaceChild(nextComponent,demoComponent);
        demoComponent=nextComponent;
    })
}*/
console.log(454545);
console.log(module.hot);
if(module.hot){
    module.hot.accept("./component",()=>{

    	console.log("hot");
        const nextComponent=create();
        document.body.replaceChild(nextComponent,demoComponent);
        demoComponent=nextComponent;
    })
}